package com.bawei.system.remote.api;

import com.bawei.system.domain.vo.EsDocInsertVo;
import com.bawei.system.domain.vo.EsDocQueryVo;
import com.bawei.system.domain.vo.EsDtoSelectVo;
import com.bawei.system.remote.factory.RemoteEsDocFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.bawei.common.core.constant.ServiceNameConstants;
import com.bawei.common.core.domain.R;

import java.util.List;

/**
 * 全文检索服务
 *
 * @author bawei
 */
@FeignClient(contextId = "remoteEsDocService", value = ServiceNameConstants.ES_SERVICE, fallbackFactory = RemoteEsDocFallbackFactory.class)
public interface RemoteEsDocService {
    @PostMapping("/esDoc/batchInsertDocs")
    public R<Boolean> batchInsertDocs(@RequestBody List<EsDocInsertVo> esDocInsertVo);


    @PostMapping("/esDoc/queryDocs")
    public R queryDocs(@RequestBody EsDocQueryVo esDocInsertVo);


    @GetMapping("/esDoc/deleteEsbyid")
    public R deleteEsbyid(@RequestParam("id") String id);

    @PostMapping("/esDoc/querySuggestions")
    public R querySuggestions(@RequestBody EsDtoSelectVo esDtoSelectVo);
}
